import React from 'react'
import ReactDOMServer from 'react-dom/server'

const render = ({
  Component = props => null,
  url = '',
  context = {},
  store,
  extractor,
}) => (
  ReactDOMServer.renderToString(extractor.collectChunks(<Component url={url} context={context} store={store} />))
)

export default render